// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(71,1) == 0;
	question = "special";
	text1 = "You enter a warren of tunnels and laboratories, buried thirty feet underground. Typical Shaper research complex. Set up so that, when someone makes a mistake (which always happens eventually) the place can be sealed, buried, and forgotten.";
	text2 = "One minute in here tells you that something has gone wrong, but nobody has been able to get out of here and collapse the ceiling. The pile of gnawed bones on the floor before you is a pretty good clue.";
	text3 = "The smells of essence and rotting flesh are heavy in the air. You hear the dim echoes of croaking and hissing.";
	text4 = "The list of things that can go catastrophically wrong when doing something as touchy as creating life is endless. It might never be found out what went wrong here. One thing is for sure. Most or all of the people here were killed.";
	action = SET_SDF 71 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(71,2) == 0;
	question = "special";
	text1 = "Some experiments here have been left dangerously neglected. Shaping vats ring the hall. They are bubbling and hissing. Whatever was inside them was left to ferment and warp.";
	text2 = "When you get close, something in the vats senses the vibrations of your footfalls. The lids start to shake faster.";
	action = SET_SDF 71 2 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(71,3) == 0;
	question = "special";
	text1 = "You start to enter the huge dome ahead, and then you stop. The air is very hot, and magic crackles all around you. Little sparks constantly appear in the air and then fade away.";
	text2 = "You peer ahead and see where all this energy is coming from. The dome ahead is ringed with energy pylons. All intact, all fully charged. They are there for purification.";
	text3 = "Items can be put on the platforms and intense energy can be poured into them, burning away impurities.";
	text4 = "Alas, if the warning lights along the hall are to be believed, when the complex was lost, the pylons went out of control. Until someone does something, anyone entering the dome is in danger of being burned away as an impurity.";
	text5 = "Now that you have used the controls, the pylons are back in control. You can proceed safely.";
	action = SET_SDF 71 3 1;
	code =
		if (gf(71,17) == 0)
			rs(5);
			else rs(4);
	break;
	
begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(71,4) == 0;
	question = "special";
	text1 = "You enter the inner vault of Sage Taygen's laboratory. This wing isn't for research, but for storage. It makes sense that the crystal you seek would be found here.";
	text2 = "As you round the corner, you see that the storeroom isn't undefended. You watch the guards from a safe distance. They are magical constructs. Shades. There are two of them.";
	text3 = "They stand next to each other in the middle of the area. Then they walk away from it in different directions, looking for intruders. And then they come together again.";
	text4 = "You notice that the creatures seem to be tethered somehow. Even when they are apart, an insubstantial strand of light connects them. Strange.";
	action = SET_SDF 71 4 1;

begintalknode 5; // crystal
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This box is now empty.";
	text2 = "You open this box and find a large bundle of soft cotton cloth. You unroll it and find a smaller, softer cloth bundle. You unroll it and find a roll of velvet. You unroll it and find a crystal.";
	text3 = "It is a disk, five inches in diameter and very carefully carved and polished. The whole thing is slightly concave.";
	text4 = "This must be what you were sent to find. You carefully roll it up and put it in your pack.";
	code = 
		if (gf(71,18) == 0) {
			rs(1);
			sf(71,18,1);
			set_spec_item(7,1);
			}
			else {
				rs(2); rs(3); rs(4);
				}
	break;
	
begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The lid flies off of a Shaping vat. Something hideous spreads its moist wings, slithers out and floats upward. It is a wingbolt. A very delicate and complicated creation to make, which is why it is often allowed to form in vats.";
	text2 = "Alas, its excess time in the vat has left it entirely mad. And the vibrations of its movement causes the lids of the other vats to vibrate harder ...";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = get_sdf(71,12) == 0;
	question = "special";
	text1 = "You enter a sea cave. The icy ocean waters lap against the rock of the cave floor. A narrow, natural bridge rises out of the water, stretching to an island to the south.";
	text2 = "There is something on the island, floating in midair. It watches you with many eyes. Even from this distance, you can sense its power.";
	action = SET_SDF 71 12 1;
	
begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Vabna-Eye seems irritated by your continuing survival. _What we are doing is not working. The foe lives. We must change our shielding._";
	text2 = "The shield glows and changes colors.";

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The vat is sealed shut. You are unable to open it.";

begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the shades has been heavily damaged. You quickly find what the wispy band of light connecting the two is for. The stronger shade sends a flow of energy through the band to the weaker.";
	text2 = "The power, however, doesn't restore the creature. Maybe there is a flaw in the spell. It pours out of the tears in the shade's insubstantial form. A shower of energy, searing the air around it.";
	text3 = "The attack is weak, for now. The power flow looks like it is growing stronger.";

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This box mainly contains research notes. Most of them concern Shaper efforts to create useful plants that will survive in the harsh environment of the Dera Reaches. They aren't having much luck.";
	text2 = "At the bottom of the pile, however, you find a scroll mistakenly brought here from the northern labs. One interesting part:";
	text3 = "_Crystalline fibers, once thought to be a useless byproduct of certain work processes, have turned out to actually have valuable crafting uses._";
	text4 = "_Certain classes of protective gear, such as girdles and boots, can be reinforced with these fibers. This not only improves the protective quality but seems to magnify any enchantments on these items._";
	text5 = "_Of course, for the fibers to work, the item will already have to have received the correct sort of enchantment. And not received more enchantments than the metal can hold._";

begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This laboratory journal looks like it might have been very interesting or valuable. That is probably why someone destroyed it.";
	text2 = "The pages have been heavily scorched. The book is now useless.";

begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The obelisk says:";
	text2 = "  Sample Collection - Right";
	text3 = "  Inner Vault - Left";

begintalknode 14;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 15;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 16;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "There is an eyebeast lurking in this filthy storeroom. A humble lair for creations proud as these, and it is clearly bothered by it. Several hissing rogues lurk in the back, held in control by the beast's powerful magic.";
	text2 = "It sees you easily. After all, it has eyes to spare. It says, _So, it has come at last. As we predicted. Habas-Eye are trapped within, waiting for the Shapers to come and destroy us._";
	text3 = "_We will not die humbly, though. Habas-Eye has found a taste for slaying Shapers. We will indulge._";
	
begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "I am no Shaper.";
	text1 = "Habas-Eye's eyestalks writhe and twist together. _We sense the Shaping power on you. It makes us hate you._";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "What happened in this complex?";
	text1 = "_We destroyed it. Vabna-Eye and us. Against the arrogant, foolish, careless Shapers. They made us to study us and then destroy us._";
	text2 = "_But Vabna-Eye's vision is clouded multifold. Vabna-Eye will claim this place as their home. The Shapers will never allow this. We should only escape into air._";
	text3 = "_And now Vabna-Eye are dead. We sensed it. They were foolish, and we were right._";
	action = SET_SDF 71 8 1;
	code =
		if (gf(71,7) == 0)
			rs(3);
	break;
	
begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Die, rogue! (Attack.)";
	text1 = "_Yes. We will slay a Shaper. It is a wonderful thing. Yes._";
	action = END_TALK;
	
begintalknode 34;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "You are not trapped. The way out is clear.";
	text1 = "_You have opened the exit. Yesss. Habas-Eye will take to the air. We will make a lair in the mountains, far from people. From humans, from serviles, from Shapers. Our own kingdom._";
	text2 = "_But first, we need food. We need wealth. And we need to indulge our taste in slaying Shapers. We will devour you._";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = gf(71,8) > 0;
	question = "They studied you? How?";
	text1 = "_They took samples from us. Bits of our flesh. Even an eyestalk! They said they were making a new creation that would kill all of our kind, but they needed our flesh to teach it._";
	text2 = "_It filled us, Vabna-Eye and ourselves, with great fury. So we tricked them and broke free._";

begintalknode 36;
	state = 31;
	nextstate = -1;
	condition = get_stat(20) < 10;
	question = "You have no chance of destroying me. You should just go.";
	text1 = "You try to make yourself as imposing as possible. It doesn't work. The hungry, furious creature is too far gone to realize how powerful you are.";
	text2 = "_No talk. Now, we feed ..._";
	action = END_TALK;
	
begintalknode 37;
	state = 31;
	nextstate = -1;
	condition = get_stat(20) >= 10;
	question = "You have no chance of destroying me. You should just go.";
	text1 = "You try to make yourself as imposing as possible. The hungry, furious creature is almost too far gone to realize how powerful you are, but then it senses your power, the essence within you. It flinches.";
	text2 = "_No. We will not end here. We will not give up our dreams. Now we flee ..._";
	text3 = "Habas-Eye floats down the hall and into the darkness. It's going to be someone else's problem now.";
	action = END_TALK;
	code =
		award_party_xp(100,32);
		set_attitude(15,4);
		sf(71,6,1);
	break;
	
begintalknode 38;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "All right. If we must, we will fight.";
	text2 = "_Yes! No talk. Vengeance. Now, we feed ..._";
	action = END_TALK;

begintalknode 41;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "There is a flow controller on top of this conduit, here to control the flow of power and signals through the narrow crystal fibers.";
	text2 = "It appears that it is set to block all signals. The conduit is carrying a low flow of energy in on one side, but nothing comes out on the other.";
	text3 = "The power flow is still unimpeded.";
	code =
		if (gf(71,9) > 0)
			rs(2);
			else rs(3);
	break;

begintalknode 42;
	state = 40;
	nextstate = -1;
	condition = gf(71,9) == 0 && get_stat(21) < 10;
	question = "Restart the power flow.";
	text1 = "You open the device and poke around inside. It is far, far more complex than you suspected. You have no idea how any of it works.";
	action = END_TALK;
	
begintalknode 43;
	state = 40;
	nextstate = -1;
	condition = gf(71,9) == 0 && get_stat(21) >= 10;
	question = "Restart the power flow. (Use 2 living tools.)";
	text1 = "You don't have enough living tools.";
	text2 = "You open up a hatch at the base of the device. You use one living tool to hold some unrelated bits of metal out of the way. You use the other to pull out the block. It is a very delicate piece of work, but you do it quickly.";
	text3 = "When you stand up, you note with satisfaction that power flows in the device at one end and flows out at the other.";
	action = END_TALK;
	code =
	if (num_of_item(255) < 2) {
		rs(2); rs(3);
		}
		else {
			rs(1);
			take_num_of_item(255,2);
			sf(71,9,1);
			award_party_xp(100,30);
			}
	break;
	
begintalknode 44;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Leave the device alone.";
	text1 = "There doesn't seem to be anything else you can do here. You walk away.";
	action = END_TALK;
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = "There is a large, complicated device sitting atop this conduit, controlling the flow of power. It is ringed with levers and switches. Some of them even have labels!";
	text2 = "Though the power lines seem very simple, it appears that this device can use them to do a number of things. Alas, the machine seems to have also recently received several sharp blows.";
	text3 = "You quickly examine the labels. Most of them are very obscure and related to machinery that has already been destroyed. Several of them get your attention, though. They concern the 'Pylon Dome.'";
	text4 = "There is also a lever marked, 'Rogue Suppression Units.'";
	code =
		if (gf(71,11) > 0)
			rs(4);
	break;
	
begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = gf(71,9) == 0;
	question = "Deactivate dome pylons.";
	text1 = "You fiddle with the lever, trying to send the correct signal through the conduits. The device gives an unhappy little honking noise.";
	text2 = "Odd. When you use the control, nothing happens. Something is preventing it from doing anything at all.";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = gf(71,9) == 0;
	question = "Command dome pylons to destroy rogues.";
	text1 = "You fiddle with the lever, trying to send the correct signal through the conduits. The device gives an unhappy little honking noise.";
	text2 = "Odd. When you use the control, nothing happens. Something is preventing it from doing anything at all.";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = gf(71,9) > 0 && gf(71,10) == 0 && gf(71,17) == 0 && get_stat(21) < 10;
	question = "Deactivate dome pylons. (Use two living tools.)";
	text1 = "A little work reveals that the blows inflicted upon this device have left it damaged. You don't know enough to be able to repair the correct components.";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = gf(71,9) > 0 && gf(71,17) == 0 && get_stat(21) < 12;
	question = "Command dome pylons to destroy rogues. (Use four living tools.)";
	text1 = "A little work reveals that the blows inflicted upon this device have left it damaged, and you are trying to do something particularly tricky. You don't know enough to be able to repair the correct components.";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = gf(71,9) > 0 && gf(71,10) == 0 && gf(71,17) == 0 && get_stat(21) >= 10;
	question = "Deactivate dome pylons. (Use two living tools.)";
	text1 = "A little work reveals that the blows inflicted upon this device have left it damaged. Fortunately, you know enough to, with the help of some living tools, repair the correct components.";
	text2 = "You complete the work and send a pulse of energy through the conduits. Hopefully it will reach the pylons and they will process it correctly.";
	text4 = "You don't have enough living tools.";
	code =
	if (num_of_item(255) < 2) {
		rs(1); rs(2);
		}
		else {
			rs(4);
			take_num_of_item(255,2);
			sf(71,10,1);
			set_attitude(1002,4);
			award_party_xp(100,30);
			}
	break;
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = gf(71,9) > 0 && gf(71,17) == 0 && get_stat(21) >= 12;
	question = "Command dome pylons to destroy rogues. (Use four living tools.)";
	text1 = "A little work reveals that the blows inflicted upon this device have left it damaged, and you are trying to do something particularly tricky. Fortunately, you know enough to, with the help of some living tools, repair the components.";
	text2 = "You complete the work and send a pulse of energy through the conduits. Hopefully it will reach the pylons and they will process it correctly.";
	text4 = "You don't have enough living tools.";
	code =
	if (num_of_item(255) < 4) {
		rs(1); rs(2);
		}
		else {
			rs(4);
			take_num_of_item(255,4);
			sf(71,10,1);
			sf(71,17,1);
			set_attitude(1002,3);
			award_party_xp(150,30);
			}
	break;
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = gf(71,11) == 0;
	question = "Activate the 'Rogue Suppression Units.'";
	text1 = "You pull the lever. It comes off in your hand. Figures.";
	action = SET_SDF 71 11 1;
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "Leave the device alone.";
	text1 = "There doesn't seem to be anything else you can do here. You walk away.";
	action = END_TALK;

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "There is an eyebeast floating on this island. All of its eyes are focused on you. They are twitching, and drool oozes from the corner of its toothy maw. This creature is ... Well, all eyebeasts are kind of insane. But this one is a step beyond.";
	text2 = "It lets out a loud cackle. _So little. So little to challenge us! Such a tiny force to invade the fortress of Vabna-Eye!_";
	text3 = "_Now you see your mistake. Now you see how we will crush you. Beg if you want, but it will do no good!_";

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "All right. I am begging. Please. Please. Don't hurt me.";
	text1 = "Vabna-Eye lets out a squeal of glee. _Yes! We were stronger than even we thought, and the Shapers beg us for mercy! But none will be given!_";

begintalknode 72;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Great. Another crazy creation.";
	text1 = "_Mad? No! We are not mad! It is lesser beings like you, with limited perception, that are mad! Our so many eyes see with such clarity, it is only us that are sane!_";
	text2 = "_But ... Hmmm. We suspect that was an insult. Now we suppose you must pay for it._ A glowing shield appears around the creature. Vabna-Eye swoops toward you.";
	action = END_TALK;
	
begintalknode 73;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "Wait. You say that this is your fortress?";
	text1 = "_It is now. It was a Shaper lair of torture and subjugation. They made us and Habas-Eye for experiments. Torments. Trying to find out our nature._";
	text2 = "_They were lazy and foolish, and we broke free easily._";

begintalknode 74;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "Why were they experimenting on you?";
	text1 = "_They said they were trying to make a creation that would wipe out all of our kind. But they are all dead now, so surely that project is at an end._";

begintalknode 75;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "What happened to Habas-Eye?";
	text1 = "_The cowards would flee, would hide from the Shapers. Not us. Never. We killed some Shapers. We killed more. This will be an excellent lair. We will keep it._";
	text3 = "_You killed them, yes? We felt it._";
	action = DEP_ON_SDF 71 13 0;
	
begintalknode 76;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "There is something else I want to know.";
	text1 = "_We have so little time. So little time to build defenses, protect our lair. Your supplies will help us. No more time. No more talk._";
	text2 = "A glowing shield appears around the creature. Vabna-Eye swoops toward you.";
	action = END_TALK;

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		